package com.Maykk.Demo02;

/**
 * @ClassName Demo02
 * @Description: TODO 成员内部类测试类
 * @Author: MaykkSTAR@163.com
 * @DATE: 2023/3/17
 */
public class Demo02 {
    private final String outStr = "我是外部类的成员变量";
    public class Inner {
        public void show() {
            System.out.println("我是内部类的show方法");
            System.out.println(outStr);
        }
    }
    public void runInner() {
        Inner inner = new Inner();
        inner.show();
    }

    public static void main(String[] args) {
        Demo02 demo02 = new Demo02();
        demo02.runInner();
        System.out.println("-=============================-");
        Inner inner = new Demo02().new Inner();
        inner.show();
    }
}
